<?php
/**
 * Funkjca do obsługi MfDictionary
 * @author MAGO
 */
function smarty_function_translate($param, &$smarty) {
	if(isset($param['label'])) {
		$translation = MfDictionaryDAL::RegistryTranslate($param['label']);//,isset($param['default'])?$param['default']:$param['label']);
		
		if(isset($param['htmlspecialchars']) && $param['htmlspecialchars'] == 1) {
			return htmlspecialchars($translation);
		}
		return $translation;
	}
}